package de.iritgo.skillfull;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;

public class MenuState extends BasicGameState 
{
	private int stateID;
	private Image background;

	public MenuState (int stateID) 
	{
		this.stateID = stateID;
	}

	@Override
	public int getID() 
	{
		return stateID;
	}

	public void init (GameContainer gc, StateBasedGame sbg) throws SlickException 
	{
		background = new Image("data/menu.png");
	}

	public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException 
	{
		background.draw(0,0);
	}

	public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException 
	{
		if (gc.getInput().isMousePressed(Input.MOUSE_LEFT_BUTTON))
		{
			sbg.enterState(2);
		}
	}
	
	public void startGame(StateBasedGame sbg) 
	{
	}

}
